@echo off
set HUMIDITY_ID=X46
set CONTACT_ID=D55
set TEMP_ID=X98
set PRESSURE_ID=K58
set SERVO_ID=D80

sed -e "s/__HUMIDITY__/%HUMIDITY_ID%/g" referencerules.txt > temp1.txt
sed -e "s/__CONTACT__/%CONTACT_ID%/g" temp1.txt > temp2.txt
sed -e "s/__TEMP__/%TEMP_ID%/g" temp2.txt > temp3.txt
sed -e "s/__PRESSURE__/%PRESSURE_ID%/g" temp3.txt > temp4.txt
sed -e "s/__SERVO__/%SERVO_ID%/g" temp4.txt > new_referencerules.txt

del temp*.txt
